
<script type="text/javascript">
 
  function checknode(obj)
  {
      var chk = $("input[type='checkbox']");
      var count = chk.length;
      var num = chk.index(obj);
      var level_top = level_bottom =  chk.eq(num).attr('level');
      for (var i=num; i>=0; i--)
      {
              var le = chk.eq(i).attr('level');
              if(eval(le) < eval(level_top)) 
              {
                  chk.eq(i).attr("checked",true);
                  var level_top = level_top-1;
              }
      }
      for (var j=num+1; j<count; j++)
      {
              var le = chk.eq(j).attr('level');
              if(chk.eq(num).attr("checked")=='checked') {
			 
                  if(eval(le) > eval(level_bottom)) chk.eq(j).attr("checked",true);
                  else if(eval(le) == eval(level_bottom)) break;
              }
              else {
                  if(eval(le) > eval(level_bottom)) chk.eq(j).attr("checked",false);
                  else if(eval(le) == eval(level_bottom)) break;
              }
      }
  }
</script>
<style>.mainnav_title{display:none;}span.w1{float:left;width:89px}</style>
<form id="myform" name="myform" action="{:U('User/savezhuanye')}" method="post">
<input type="hidden" id="uid" name="uid" value="{$uid}" />
<div class="pad-lr-10">
<div class="table-list">
    <table width="100%"  cellpadding="1" cellspacing="1" border="1" id="dnd-example"> 
	<tbody>
        <if condition ="$level eq '1' " >
	<volist name="list" id="rr">
			
		
			<tr>
                        <td>
                            {$rr.title}
			</td>
			
			<td>		
                        
			<span class="w1"><input type='checkbox' name='nid[{$rr.id}]' value='{$rr.id}'  level='{$rrr.level}' <volist name="aczy" id ="vo"> <if condition = "$vo['zyid'] eq $rr['id']">checked="checked"</if></volist>  onclick='javascript:checknode(this);' /> {$rrr.title} &nbsp;</span>
                       
			</td>
			
			</tr>	
		
			</volist>
	 <else /> 
                      <tr><td>选择学校</td><td>选择专业</td></tr>
         <volist name="list" id="rr">

         	<tr>
                        <td>
                            {$rr.title}&nbsp;<input type="radio" name="scid" value="{$rr.id}" <if condition = "$rr['id'] eq $aczy[0]['schoolid'] ">checked &nbsp;</if> >
			</td>
			
			<td>		
                        
                        <volist name="rr['zy']" id="vo">    
                            &nbsp;{$vo.ztitle}:&nbsp;<input type="checkbox" name="zyid[{$vo.zid}]" value="{$vo.zid}" <volist name="aczy" id="kkk"> <if condition = " ($vo['zzyid'] eq $kkk['zyid']) && ($kkk['schoolid'] eq $vo['azschoolid']) ">checked</if> </volist>  >&nbsp;
                        </volist>
                          <!--   <span class="w1"><input type='checkbox' name='nid[{$rr.id}]' value='{$rr.id}'  level='{$rrr.level}' <volist name="aczy" id ="vo"> <if condition = "$vo['zyid'] eq $rr['id']">checked="checked"</if></volist>  onclick='javascript:checknode(this);' /> {$rrr.title} &nbsp;</span>-->
                       
			</td>
			
			</tr>	
		
			</volist>
        </if>
        <input type="hidden" name="level" value="{$level}" />
	<input type="hidden" name="isajax" value="1" />
	<input name="dosubmit" type="submit" value="1" class="hidden" id="dosubmit"> 
	</tbody>
    </table>
</div>
</div>
</form></div>
 